<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>CategoryPage</title>
    <link rel="StyleSheet" href="../../css/mypetstore.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="jsp/common/top">
</div>
<div id="Content">

    <div id="BackLink">
        <a href="/catalog/view">Return to Main Menu</a>
    </div>

    <div id="Catalog">

        <h2 th:text="${category.getName()}">Category的name属性</h2>

        <table>
            <tr>
                <th>Product ID</th>
                <th>Name</th>
            </tr>

            <tr th:each="product:${productList}">
<!--                <td th:text="${product.getProductid()}">productId</td>-->
                <td>
<!--                    @{/catalog/viewProduct?productId=}+${product.getProductid()-->
                    <a th:href="@{/catalog/viewProduct(productId=${product.getProductid()})}"
                       th:text="${product.getProductid()}">
                      go to product page
                    </a>
                </td>
                <td th:text="${product.getName()}">product name</td>
            </tr>

            <!--            <c:forEach var="product" items="${sessionScope.productList}">-->
            <!--                <tr>-->
            <!--                    <td>-->
            <!--                        <a href="productForm?productId=${product.productId}" class="productShow_3"-->
            <!--                           data-name="${product.productId}">${product.productId}</a>-->
            <!--                    </td>-->
            <!--                    <td>${product.name}</td>-->
            <!--                </tr>-->
            <!--            </c:forEach>-->
        </table>

    </div>

</div>
<div th:replace="jsp/common/bottom">

</div>

</body>
</html>